Skip to content

Update defaultdict snippet expectation for Jedi 0.20#711

Open
mcepl wants to merge 1 commit into
python-lsp:developfrom
openSUSE-Python:compatibility-jedi-0_20
Open

Update defaultdict snippet expectation for Jedi 0.20#711
mcepl wants to merge 1 commit into
python-lsp:developfrom
openSUSE-Python:compatibility-jedi-0_20

Conversation

@mcepl
Copy link
Copy Markdown

@mcepl mcepl commented May 23, 2026

Jedi 0.20 now resolves collections.defaultdict with an empty callable signature, so pylsp formats the completion as defaultdict() instead of the placeholder snippet defaultdict($0). Update the completion test to reflect that this result is plain insert text and therefore does not include insertTextFormat.

Jedi 0.20 now resolves collections.defaultdict with an empty callable
signature, so pylsp formats the completion as defaultdict() instead of
the placeholder snippet defaultdict($0). Update the completion test to
reflect that this result is plain insert text and therefore does not
include insertTextFormat.
algitbot pushed a commit to alpinelinux/aports that referenced this pull request May 25, 2026
Apply this patch:
python-lsp/python-lsp-server#711

Fix for:
  >       assert completions[0]["insertText"] == "defaultdict($0)"
  E       AssertionError: assert 'defaultdict()' == 'defaultdict($0)'
  E
  E         - defaultdict($0)
  E         ?             --
  E         + defaultdict()

  test/plugins/test_completion.py:337: AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant